package com.ruoyi.basic.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.basic.domain.TbDailyUnitPrice;
import com.ruoyi.basic.domain.TbDailyUnitPriceDetail;
import com.ruoyi.basic.mapper.TbDailyUnitPriceDetailMapper;
import com.ruoyi.basic.service.ITbDailyUnitPriceDetailService;
import com.ruoyi.common.utils.DateUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 定额工日/实际工日单价Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-09-04
 */
@Service
public class TbDailyUnitPriceDetailServiceImpl extends ServiceImpl<TbDailyUnitPriceDetailMapper, TbDailyUnitPriceDetail> implements ITbDailyUnitPriceDetailService
{

    @Override
    public List<TbDailyUnitPriceDetail> listByUnitPriceId(Long id) {
        LambdaQueryWrapper<TbDailyUnitPriceDetail> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(TbDailyUnitPriceDetail::getUnitPriceId,id);
        return list(wrapper);
    }

    @Override
    public List<TbDailyUnitPriceDetail> listByCondition(TbDailyUnitPrice tbDailyUnitPrice) {
        return getBaseMapper().selectDailyList(tbDailyUnitPrice);
    }
}
